package com.ktwlsoft.archivemanage.domain.business.repositoryService.study;

import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ktwlsoft.archivemanage.domain.dao.repository.study.StudyCollectionMapper;
import lombok.Getter;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 课程收藏
 *
 * @author Name on 2019/12/25 11:07
 * @version 1.0
 */
@Service
public class StudyCollectionRepositoryService {

    @Getter
    private final StudyCollectionMapper studyCollectionMapper;

    public StudyCollectionRepositoryService(StudyCollectionMapper studyCollectionMapper) {
        this.studyCollectionMapper = studyCollectionMapper;
    }

    public PageInfo<JSONObject> findPage(int pn,int pageSize,JSONObject jsonObject){
        PageHelper.startPage(pn,pageSize);
        return new PageInfo<>(studyCollectionMapper.findList(jsonObject));
    }
}